Integrand size = 23, antiderivative size = 160 \[ \int \frac {\cot ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\frac {x}{a^2}-\frac {b^{5/2} (7 a+2 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{2 a^2 (a+b)^{7/2} f}+\frac {\left (2 a^2+6 a b-b^2\right ) \cot (e+f x)}{2 a (a+b)^3 f}-\frac {(2 a-3 b) \cot ^3(e+f x)}{6 a (a+b)^2 f}-\frac {b \cot ^3(e+f x)}{2 a (a+b) f \left (a+b+b \tan ^2(e+f x)\right )} \]
x/a^2-1/2*b^(5/2)*(7*a+2*b)*arctan(b^(1/2)*tan(f*x+e)/(a+b)^(1/2))/a^2/(a+ b)^(7/2)/f+1/2*(2*a^2+6*a*b-b^2)*cot(f*x+e)/a/(a+b)^3/f-1/6*(2*a-3*b)*cot( f*x+e)^3/a/(a+b)^2/f-1/2*b*cot(f*x+e)^3/a/(a+b)/f/(a+b+b*tan(f*x+e)^2)
Result contains complex when optimal does not.
Time = 8.33 (sec) , antiderivative size = 1896, normalized size of antiderivative = 11.85 \[ \int \frac {\cot ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx =\text {Too large to display} \]
((7*a + 2*b)*(a + 2*b + a*Cos[2*e + 2*f*x])^2*Sec[e + f*x]^4*((b^3*ArcTan[ Sec[f*x]*(Cos[2*e]/(2*Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]) - ((I/2 )*Sin[2*e])/(Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]))*(-(a*Sin[f*x]) - 2*b*Sin[f*x] + a*Sin[2*e + f*x])]*Cos[2*e])/(8*a^2*Sqrt[a + b]*f*Sqrt[b* Cos[4*e] - I*b*Sin[4*e]]) - ((I/8)*b^3*ArcTan[Sec[f*x]*(Cos[2*e]/(2*Sqrt[a + b]*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]]) - ((I/2)*Sin[2*e])/(Sqrt[a + b]*Sqr t[b*Cos[4*e] - I*b*Sin[4*e]]))*(-(a*Sin[f*x]) - 2*b*Sin[f*x] + a*Sin[2*e + f*x])]*Sin[2*e])/(a^2*Sqrt[a + b]*f*Sqrt[b*Cos[4*e] - I*b*Sin[4*e]])))/(( a + b)^3*(a + b*Sec[e + f*x]^2)^2) + ((a + 2*b + a*Cos[2*e + 2*f*x])*Csc[e ]*Csc[e + f*x]^3*Sec[2*e]*Sec[e + f*x]^4*(-6*a^4*f*x*Cos[f*x] - 54*a^3*b*f *x*Cos[f*x] - 126*a^2*b^2*f*x*Cos[f*x] - 114*a*b^3*f*x*Cos[f*x] - 36*b^4*f *x*Cos[f*x] + 3*a^4*f*x*Cos[3*f*x] - 3*a^3*b*f*x*Cos[3*f*x] - 27*a^2*b^2*f *x*Cos[3*f*x] - 33*a*b^3*f*x*Cos[3*f*x] - 12*b^4*f*x*Cos[3*f*x] + 6*a^4*f* x*Cos[2*e - f*x] + 54*a^3*b*f*x*Cos[2*e - f*x] + 126*a^2*b^2*f*x*Cos[2*e - f*x] + 114*a*b^3*f*x*Cos[2*e - f*x] + 36*b^4*f*x*Cos[2*e - f*x] + 6*a^4*f *x*Cos[2*e + f*x] + 54*a^3*b*f*x*Cos[2*e + f*x] + 126*a^2*b^2*f*x*Cos[2*e + f*x] + 114*a*b^3*f*x*Cos[2*e + f*x] + 36*b^4*f*x*Cos[2*e + f*x] - 6*a^4* f*x*Cos[4*e + f*x] - 54*a^3*b*f*x*Cos[4*e + f*x] - 126*a^2*b^2*f*x*Cos[4*e + f*x] - 114*a*b^3*f*x*Cos[4*e + f*x] - 36*b^4*f*x*Cos[4*e + f*x] - 3*a^4 *f*x*Cos[2*e + 3*f*x] + 3*a^3*b*f*x*Cos[2*e + 3*f*x] + 27*a^2*b^2*f*x*C...
Time = 0.47 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.14, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.435, Rules used = {3042, 4629, 2075, 374, 445, 27, 445, 397, 216, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\tan (e+f x)^4 \left (a+b \sec (e+f x)^2\right )^2}dx\) |
\(\Big \downarrow \) 4629 |
\(\displaystyle \frac {\int \frac {\cot ^4(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (a+b \left (\tan ^2(e+f x)+1\right )\right )^2}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 2075 |
\(\displaystyle \frac {\int \frac {\cot ^4(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^2}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 374 |
\(\displaystyle \frac {\frac {\int \frac {\cot ^4(e+f x) \left (-5 b \tan ^2(e+f x)+2 a-3 b\right )}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )}d\tan (e+f x)}{2 a (a+b)}-\frac {b \cot ^3(e+f x)}{2 a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}}{f}\) |
\(\Big \downarrow \) 445 |
\(\displaystyle \frac {\frac {-\frac {\int \frac {3 \cot ^2(e+f x) \left (2 a^2+6 b a-b^2+(2 a-3 b) b \tan ^2(e+f x)\right )}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )}d\tan (e+f x)}{3 (a+b)}-\frac {(2 a-3 b) \cot ^3(e+f x)}{3 (a+b)}}{2 a (a+b)}-\frac {b \cot ^3(e+f x)}{2 a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}}{f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {-\frac {\int \frac {\cot ^2(e+f x) \left (2 a^2+6 b a-b^2+(2 a-3 b) b \tan ^2(e+f x)\right )}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )}d\tan (e+f x)}{a+b}-\frac {(2 a-3 b) \cot ^3(e+f x)}{3 (a+b)}}{2 a (a+b)}-\frac {b \cot ^3(e+f x)}{2 a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}}{f}\) |
\(\Big \downarrow \) 445 |
\(\displaystyle \frac {\frac {-\frac {-\frac {\int \frac {2 a^3+8 b a^2+12 b^2 a+b^3+b \left (2 a^2+6 b a-b^2\right ) \tan ^2(e+f x)}{\left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )}d\tan (e+f x)}{a+b}-\frac {\left (2 a^2+6 a b-b^2\right ) \cot (e+f x)}{a+b}}{a+b}-\frac {(2 a-3 b) \cot ^3(e+f x)}{3 (a+b)}}{2 a (a+b)}-\frac {b \cot ^3(e+f x)}{2 a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}}{f}\) |
\(\Big \downarrow \) 397 |
\(\displaystyle \frac {\frac {-\frac {-\frac {\frac {2 (a+b)^3 \int \frac {1}{\tan ^2(e+f x)+1}d\tan (e+f x)}{a}-\frac {b^3 (7 a+2 b) \int \frac {1}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)}{a}}{a+b}-\frac {\left (2 a^2+6 a b-b^2\right ) \cot (e+f x)}{a+b}}{a+b}-\frac {(2 a-3 b) \cot ^3(e+f x)}{3 (a+b)}}{2 a (a+b)}-\frac {b \cot ^3(e+f x)}{2 a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}}{f}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {\frac {-\frac {-\frac {\frac {2 (a+b)^3 \arctan (\tan (e+f x))}{a}-\frac {b^3 (7 a+2 b) \int \frac {1}{b \tan ^2(e+f x)+a+b}d\tan (e+f x)}{a}}{a+b}-\frac {\left (2 a^2+6 a b-b^2\right ) \cot (e+f x)}{a+b}}{a+b}-\frac {(2 a-3 b) \cot ^3(e+f x)}{3 (a+b)}}{2 a (a+b)}-\frac {b \cot ^3(e+f x)}{2 a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}}{f}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {-\frac {-\frac {\left (2 a^2+6 a b-b^2\right ) \cot (e+f x)}{a+b}-\frac {\frac {2 (a+b)^3 \arctan (\tan (e+f x))}{a}-\frac {b^{5/2} (7 a+2 b) \arctan \left (\frac {\sqrt {b} \tan (e+f x)}{\sqrt {a+b}}\right )}{a \sqrt {a+b}}}{a+b}}{a+b}-\frac {(2 a-3 b) \cot ^3(e+f x)}{3 (a+b)}}{2 a (a+b)}-\frac {b \cot ^3(e+f x)}{2 a (a+b) \left (a+b \tan ^2(e+f x)+b\right )}}{f}\) |
((-1/3*((2*a - 3*b)*Cot[e + f*x]^3)/(a + b) - (-(((2*(a + b)^3*ArcTan[Tan[ e + f*x]])/a - (b^(5/2)*(7*a + 2*b)*ArcTan[(Sqrt[b]*Tan[e + f*x])/Sqrt[a + b]])/(a*Sqrt[a + b]))/(a + b)) - ((2*a^2 + 6*a*b - b^2)*Cot[e + f*x])/(a + b))/(a + b))/(2*a*(a + b)) - (b*Cot[e + f*x]^3)/(2*a*(a + b)*(a + b + b* Tan[e + f*x]^2)))/f
3.4.61.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a , 0] || GtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_)*((c_) + (d_.)*(x_)^2)^(q_ ), x_Symbol] :> Simp[(-b)*(e*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(a*e*2*(b*c - a*d)*(p + 1))), x] + Simp[1/(a*2*(b*c - a*d)*(p + 1)) Int[(e*x)^m*(a + b*x^2)^(p + 1)*(c + d*x^2)^q*Simp[b*c*(m + 1) + 2*(b*c - a*d)*(p + 1) + d*b*(m + 2*(p + q + 2) + 1)*x^2, x], x], x] /; FreeQ[{a, b, c, d, e, m, q}, x] && NeQ[b*c - a*d, 0] && LtQ[p, -1] && IntBinomialQ[a, b, c, d, e, m, 2, p, q, x]
Int[((e_) + (f_.)*(x_)^2)/(((a_) + (b_.)*(x_)^2)*((c_) + (d_.)*(x_)^2)), x_ Symbol] :> Simp[(b*e - a*f)/(b*c - a*d) Int[1/(a + b*x^2), x], x] - Simp[ (d*e - c*f)/(b*c - a*d) Int[1/(c + d*x^2), x], x] /; FreeQ[{a, b, c, d, e , f}, x]
Int[((g_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_ .)*((e_) + (f_.)*(x_)^2), x_Symbol] :> Simp[e*(g*x)^(m + 1)*(a + b*x^2)^(p + 1)*((c + d*x^2)^(q + 1)/(a*c*g*(m + 1))), x] + Simp[1/(a*c*g^2*(m + 1)) Int[(g*x)^(m + 2)*(a + b*x^2)^p*(c + d*x^2)^q*Simp[a*f*c*(m + 1) - e*(b*c + a*d)*(m + 2 + 1) - e*2*(b*c*p + a*d*q) - b*e*d*(m + 2*(p + q + 2) + 1)*x^ 2, x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p, q}, x] && LtQ[m, -1]
Int[(u_)^(p_.)*(v_)^(q_.)*((e_.)*(x_))^(m_.), x_Symbol] :> Int[(e*x)^m*Expa ndToSum[u, x]^p*ExpandToSum[v, x]^q, x] /; FreeQ[{e, m, p, q}, x] && Binomi alQ[{u, v}, x] && EqQ[BinomialDegree[u, x] - BinomialDegree[v, x], 0] && ! BinomialMatchQ[{u, v}, x]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*((d_.)*tan[(e_.) + (f _.)*(x_)])^(m_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Sim p[ff/f Subst[Int[(d*ff*x)^m*((a + b*(1 + ff^2*x^2)^(n/2))^p/(1 + ff^2*x^2 )), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, d, e, f, m, p}, x] && Inte gerQ[n/2] && (IntegerQ[m/2] || EqQ[n, 2])
Time = 9.73 (sec) , antiderivative size = 124, normalized size of antiderivative = 0.78
method | result | size |
derivativedivides | \(\frac {\frac {\arctan \left (\tan \left (f x +e \right )\right )}{a^{2}}-\frac {1}{3 \left (a +b \right )^{2} \tan \left (f x +e \right )^{3}}-\frac {-a -3 b}{\left (a +b \right )^{3} \tan \left (f x +e \right )}-\frac {b^{3} \left (\frac {a \tan \left (f x +e \right )}{2 a +2 b +2 b \tan \left (f x +e \right )^{2}}+\frac {\left (7 a +2 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \sqrt {\left (a +b \right ) b}}\right )}{a^{2} \left (a +b \right )^{3}}}{f}\) | \(124\) |
default | \(\frac {\frac {\arctan \left (\tan \left (f x +e \right )\right )}{a^{2}}-\frac {1}{3 \left (a +b \right )^{2} \tan \left (f x +e \right )^{3}}-\frac {-a -3 b}{\left (a +b \right )^{3} \tan \left (f x +e \right )}-\frac {b^{3} \left (\frac {a \tan \left (f x +e \right )}{2 a +2 b +2 b \tan \left (f x +e \right )^{2}}+\frac {\left (7 a +2 b \right ) \arctan \left (\frac {b \tan \left (f x +e \right )}{\sqrt {\left (a +b \right ) b}}\right )}{2 \sqrt {\left (a +b \right ) b}}\right )}{a^{2} \left (a +b \right )^{3}}}{f}\) | \(124\) |
risch | \(\frac {x}{a^{2}}-\frac {i \left (-12 a^{4} {\mathrm e}^{8 i \left (f x +e \right )}-24 a^{3} b \,{\mathrm e}^{8 i \left (f x +e \right )}+3 a \,b^{3} {\mathrm e}^{8 i \left (f x +e \right )}+6 b^{4} {\mathrm e}^{8 i \left (f x +e \right )}-12 a^{4} {\mathrm e}^{6 i \left (f x +e \right )}-60 a^{3} b \,{\mathrm e}^{6 i \left (f x +e \right )}-96 a^{2} b^{2} {\mathrm e}^{6 i \left (f x +e \right )}-6 a \,b^{3} {\mathrm e}^{6 i \left (f x +e \right )}-18 b^{4} {\mathrm e}^{6 i \left (f x +e \right )}+4 a^{4} {\mathrm e}^{4 i \left (f x +e \right )}+76 a^{3} b \,{\mathrm e}^{4 i \left (f x +e \right )}+144 a^{2} b^{2} {\mathrm e}^{4 i \left (f x +e \right )}+18 b^{4} {\mathrm e}^{4 i \left (f x +e \right )}-4 \,{\mathrm e}^{2 i \left (f x +e \right )} a^{4}-36 a^{3} b \,{\mathrm e}^{2 i \left (f x +e \right )}-80 a^{2} b^{2} {\mathrm e}^{2 i \left (f x +e \right )}+6 a \,b^{3} {\mathrm e}^{2 i \left (f x +e \right )}-6 b^{4} {\mathrm e}^{2 i \left (f x +e \right )}-8 a^{4}-20 a^{3} b -3 a \,b^{3}\right )}{3 f \left (a +b \right )^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3} a^{2} \left (a \,{\mathrm e}^{4 i \left (f x +e \right )}+2 a \,{\mathrm e}^{2 i \left (f x +e \right )}+4 b \,{\mathrm e}^{2 i \left (f x +e \right )}+a \right )}+\frac {7 \sqrt {-\left (a +b \right ) b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{4 \left (a +b \right )^{4} f a}+\frac {\sqrt {-\left (a +b \right ) b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {-\left (a +b \right ) b}+a +2 b}{a}\right )}{2 \left (a +b \right )^{4} f \,a^{2}}-\frac {7 \sqrt {-\left (a +b \right ) b}\, b^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{4 \left (a +b \right )^{4} f a}-\frac {\sqrt {-\left (a +b \right ) b}\, b^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {-\left (a +b \right ) b}-a -2 b}{a}\right )}{2 \left (a +b \right )^{4} f \,a^{2}}\) | \(585\) |
1/f*(1/a^2*arctan(tan(f*x+e))-1/3/(a+b)^2/tan(f*x+e)^3-(-a-3*b)/(a+b)^3/ta n(f*x+e)-b^3/a^2/(a+b)^3*(1/2*a*tan(f*x+e)/(a+b+b*tan(f*x+e)^2)+1/2*(7*a+2 *b)/((a+b)*b)^(1/2)*arctan(b*tan(f*x+e)/((a+b)*b)^(1/2))))
Leaf count of result is larger than twice the leaf count of optimal. 446 vs. \(2 (144) = 288\).
Time = 0.32 (sec) , antiderivative size = 979, normalized size of antiderivative = 6.12 \[ \int \frac {\cot ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\text {Too large to display} \]
[1/24*(4*(8*a^4 + 20*a^3*b + 3*a*b^3)*cos(f*x + e)^5 - 8*(3*a^4 + 5*a^3*b - 10*a^2*b^2 + 3*a*b^3)*cos(f*x + e)^3 + 3*((7*a^2*b^2 + 2*a*b^3)*cos(f*x + e)^4 - 7*a*b^3 - 2*b^4 - (7*a^2*b^2 - 5*a*b^3 - 2*b^4)*cos(f*x + e)^2)*s qrt(-b/(a + b))*log(((a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^4 - 2*(3*a*b + 4*b ^2)*cos(f*x + e)^2 + 4*((a^2 + 3*a*b + 2*b^2)*cos(f*x + e)^3 - (a*b + b^2) *cos(f*x + e))*sqrt(-b/(a + b))*sin(f*x + e) + b^2)/(a^2*cos(f*x + e)^4 + 2*a*b*cos(f*x + e)^2 + b^2))*sin(f*x + e) - 12*(2*a^3*b + 6*a^2*b^2 - a*b^ 3)*cos(f*x + e) + 24*((a^4 + 3*a^3*b + 3*a^2*b^2 + a*b^3)*f*x*cos(f*x + e) ^4 - (a^4 + 2*a^3*b - 2*a*b^3 - b^4)*f*x*cos(f*x + e)^2 - (a^3*b + 3*a^2*b ^2 + 3*a*b^3 + b^4)*f*x)*sin(f*x + e))/(((a^6 + 3*a^5*b + 3*a^4*b^2 + a^3* b^3)*f*cos(f*x + e)^4 - (a^6 + 2*a^5*b - 2*a^3*b^3 - a^2*b^4)*f*cos(f*x + e)^2 - (a^5*b + 3*a^4*b^2 + 3*a^3*b^3 + a^2*b^4)*f)*sin(f*x + e)), 1/12*(2 *(8*a^4 + 20*a^3*b + 3*a*b^3)*cos(f*x + e)^5 - 4*(3*a^4 + 5*a^3*b - 10*a^2 *b^2 + 3*a*b^3)*cos(f*x + e)^3 + 3*((7*a^2*b^2 + 2*a*b^3)*cos(f*x + e)^4 - 7*a*b^3 - 2*b^4 - (7*a^2*b^2 - 5*a*b^3 - 2*b^4)*cos(f*x + e)^2)*sqrt(b/(a + b))*arctan(1/2*((a + 2*b)*cos(f*x + e)^2 - b)*sqrt(b/(a + b))/(b*cos(f* x + e)*sin(f*x + e)))*sin(f*x + e) - 6*(2*a^3*b + 6*a^2*b^2 - a*b^3)*cos(f *x + e) + 12*((a^4 + 3*a^3*b + 3*a^2*b^2 + a*b^3)*f*x*cos(f*x + e)^4 - (a^ 4 + 2*a^3*b - 2*a*b^3 - b^4)*f*x*cos(f*x + e)^2 - (a^3*b + 3*a^2*b^2 + 3*a *b^3 + b^4)*f*x)*sin(f*x + e))/(((a^6 + 3*a^5*b + 3*a^4*b^2 + a^3*b^3)*...
\[ \int \frac {\cot ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\int \frac {\cot ^{4}{\left (e + f x \right )}}{\left (a + b \sec ^{2}{\left (e + f x \right )}\right )^{2}}\, dx \]
Time = 0.32 (sec) , antiderivative size = 235, normalized size of antiderivative = 1.47 \[ \int \frac {\cot ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {\frac {3 \, {\left (7 \, a b^{3} + 2 \, b^{4}\right )} \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {{\left (a + b\right )} b}}\right )}{{\left (a^{5} + 3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} \sqrt {{\left (a + b\right )} b}} - \frac {3 \, {\left (2 \, a^{2} b + 6 \, a b^{2} - b^{3}\right )} \tan \left (f x + e\right )^{4} - 2 \, a^{3} - 4 \, a^{2} b - 2 \, a b^{2} + 2 \, {\left (3 \, a^{3} + 11 \, a^{2} b + 8 \, a b^{2}\right )} \tan \left (f x + e\right )^{2}}{{\left (a^{4} b + 3 \, a^{3} b^{2} + 3 \, a^{2} b^{3} + a b^{4}\right )} \tan \left (f x + e\right )^{5} + {\left (a^{5} + 4 \, a^{4} b + 6 \, a^{3} b^{2} + 4 \, a^{2} b^{3} + a b^{4}\right )} \tan \left (f x + e\right )^{3}} - \frac {6 \, {\left (f x + e\right )}}{a^{2}}}{6 \, f} \]
-1/6*(3*(7*a*b^3 + 2*b^4)*arctan(b*tan(f*x + e)/sqrt((a + b)*b))/((a^5 + 3 *a^4*b + 3*a^3*b^2 + a^2*b^3)*sqrt((a + b)*b)) - (3*(2*a^2*b + 6*a*b^2 - b ^3)*tan(f*x + e)^4 - 2*a^3 - 4*a^2*b - 2*a*b^2 + 2*(3*a^3 + 11*a^2*b + 8*a *b^2)*tan(f*x + e)^2)/((a^4*b + 3*a^3*b^2 + 3*a^2*b^3 + a*b^4)*tan(f*x + e )^5 + (a^5 + 4*a^4*b + 6*a^3*b^2 + 4*a^2*b^3 + a*b^4)*tan(f*x + e)^3) - 6* (f*x + e)/a^2)/f
Time = 0.45 (sec) , antiderivative size = 212, normalized size of antiderivative = 1.32 \[ \int \frac {\cot ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=-\frac {\frac {3 \, b^{3} \tan \left (f x + e\right )}{{\left (a^{4} + 3 \, a^{3} b + 3 \, a^{2} b^{2} + a b^{3}\right )} {\left (b \tan \left (f x + e\right )^{2} + a + b\right )}} + \frac {3 \, {\left (7 \, a b^{3} + 2 \, b^{4}\right )} {\left (\pi \left \lfloor \frac {f x + e}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (f x + e\right )}{\sqrt {a b + b^{2}}}\right )\right )}}{{\left (a^{5} + 3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} \sqrt {a b + b^{2}}} - \frac {6 \, {\left (f x + e\right )}}{a^{2}} - \frac {2 \, {\left (3 \, a \tan \left (f x + e\right )^{2} + 9 \, b \tan \left (f x + e\right )^{2} - a - b\right )}}{{\left (a^{3} + 3 \, a^{2} b + 3 \, a b^{2} + b^{3}\right )} \tan \left (f x + e\right )^{3}}}{6 \, f} \]
-1/6*(3*b^3*tan(f*x + e)/((a^4 + 3*a^3*b + 3*a^2*b^2 + a*b^3)*(b*tan(f*x + e)^2 + a + b)) + 3*(7*a*b^3 + 2*b^4)*(pi*floor((f*x + e)/pi + 1/2)*sgn(b) + arctan(b*tan(f*x + e)/sqrt(a*b + b^2)))/((a^5 + 3*a^4*b + 3*a^3*b^2 + a ^2*b^3)*sqrt(a*b + b^2)) - 6*(f*x + e)/a^2 - 2*(3*a*tan(f*x + e)^2 + 9*b*t an(f*x + e)^2 - a - b)/((a^3 + 3*a^2*b + 3*a*b^2 + b^3)*tan(f*x + e)^3))/f
Time = 25.73 (sec) , antiderivative size = 4987, normalized size of antiderivative = 31.17 \[ \int \frac {\cot ^4(e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx=\text {Too large to display} \]
((tan(e + f*x)^2*(3*a + 8*b))/(3*(a + b)^2) - 1/(3*(a + b)) + (tan(e + f*x )^4*(6*a*b^2 + 2*a^2*b - b^3))/(2*a*(a + b)^3))/(f*(tan(e + f*x)^3*(a + b) + b*tan(e + f*x)^5)) + atan((560*a^3*b^16*tan(e + f*x))/(560*a^3*b^16 + 7 280*a^4*b^15 + 42560*a^5*b^14 + 149184*a^6*b^13 + 351904*a^7*b^12 + 593440 *a^8*b^11 + 741120*a^9*b^10 + 699840*a^10*b^9 + 505008*a^11*b^8 + 278768*a ^12*b^7 + 116480*a^13*b^6 + 35840*a^14*b^5 + 7680*a^15*b^4 + 1024*a^16*b^3 + 64*a^17*b^2) + (7280*a^4*b^15*tan(e + f*x))/(560*a^3*b^16 + 7280*a^4*b^ 15 + 42560*a^5*b^14 + 149184*a^6*b^13 + 351904*a^7*b^12 + 593440*a^8*b^11 + 741120*a^9*b^10 + 699840*a^10*b^9 + 505008*a^11*b^8 + 278768*a^12*b^7 + 116480*a^13*b^6 + 35840*a^14*b^5 + 7680*a^15*b^4 + 1024*a^16*b^3 + 64*a^17 *b^2) + (42560*a^5*b^14*tan(e + f*x))/(560*a^3*b^16 + 7280*a^4*b^15 + 4256 0*a^5*b^14 + 149184*a^6*b^13 + 351904*a^7*b^12 + 593440*a^8*b^11 + 741120* a^9*b^10 + 699840*a^10*b^9 + 505008*a^11*b^8 + 278768*a^12*b^7 + 116480*a^ 13*b^6 + 35840*a^14*b^5 + 7680*a^15*b^4 + 1024*a^16*b^3 + 64*a^17*b^2) + ( 149184*a^6*b^13*tan(e + f*x))/(560*a^3*b^16 + 7280*a^4*b^15 + 42560*a^5*b^ 14 + 149184*a^6*b^13 + 351904*a^7*b^12 + 593440*a^8*b^11 + 741120*a^9*b^10 + 699840*a^10*b^9 + 505008*a^11*b^8 + 278768*a^12*b^7 + 116480*a^13*b^6 + 35840*a^14*b^5 + 7680*a^15*b^4 + 1024*a^16*b^3 + 64*a^17*b^2) + (351904*a ^7*b^12*tan(e + f*x))/(560*a^3*b^16 + 7280*a^4*b^15 + 42560*a^5*b^14 + 149 184*a^6*b^13 + 351904*a^7*b^12 + 593440*a^8*b^11 + 741120*a^9*b^10 + 69...